/*
	The GAE SWF Project: 
	Knowledge and tools to help you build Flash and Flex apps on Google App Engine.	
	Copyright (c) 2008 Aral Balkan. All Rights Reserved.
	Released under the open source MIT License. See LICENSE.txt for full license terms.

	Model class (static)
	====================
	The Model holds the data for the application. It listens for service responses and
	populates its data models in the handlers.  
*/
package net.ba.models
{
	
	import mx.collections.ArrayCollection;
	import mx.core.Application;
	
	import org.gaeswf.ServiceRO;
	

	public class Model{
	
		//General purpose vars from startup
		public static var wmsServer:String = Application.application.parameters.wmsServer;
		public static var geowebcacheServer:String = Application.application.parameters.geowebcacheServer;
		public static var amfEndPoint:String = Application.application.parameters.amfEndPoint;
		public static var amfSpatialEndPoint:String = Application.application.parameters.amfSpatialEndPoint;
		
		
		[Bindable] public static var activeTaxon:TaxonName = new TaxonName();
		[Bindable] public static var taxonSearchResults:ArrayCollection;
		
		[Bindable] public static var flickrPolygons:Array = new Array();
		
		
		
		public static function init():void
		{			
			// Listen for service events
			
		}
		







		
		// Service listener helper
		private static function listen(serviceName:String):void
		{
			// Add the model as a listener for service responses.
			ServiceRO.listen(serviceName, Model);
		} 
		
	}
}